<?php
    //debug($return_arr);
?>
<table class="tablep table-bordered">
    <thead>
        <tr>
            <th>Customer</th>
            <th>Total Opening Balance <?php echo $tran_currency; ?></th>
            <th>Total Undue <?php echo $tran_currency; ?></th>
            <th>Total Past Due <?php echo $tran_currency; ?></th>
            <th>Total Repayment <?php echo $tran_currency; ?></th>
            <th>Total Principal Balance <?php echo $tran_currency; ?></th>
            <th>Total Interest <?php echo $tran_currency; ?></th>
            <th>Total Balance <?php echo $tran_currency; ?></th>
        </tr>
    </thead>
    <tbody>
    <?php
        if(isset($return_arr)){
            $data = $return_arr;
            foreach($data as $row){
            ?>
                <tr>
                    <td><?php echo ucwords(strtolower($row['cell'][1]))?></td>
                    <td><?php echo $row['cell'][2]?></td>
                    <td><?php echo $row['cell'][3]?></td>
                    <td><?php echo $row['cell'][4]?></td>
                    <td><?php echo $row['cell'][5]?></td>
                    <td><?php echo $row['cell'][6]?></td>
                    <td><?php echo $row['cell'][7]?></td>
                    <td><?php echo $row['cell'][8]?></td>
                </tr>
            <?php
            }
        }
    ?>
    </tbody>
</table>